package config

type AsrConfig struct {
	AccessKeyId                    string `json:"accessKeyId"`
	AccessKeySecret                string `json:"accessKeySecret"`
	RegionId                       string `json:"regionId"`
	Domain                         string `json:"domain"`
	ApiUrl                         string `json:"apiUrl"`
	AppKey                         string `json:"appKey"`
	Endpoint                       string `json:"endpoint"`
	Format                         string `json:"format,omitempty"`
	SampleRate                     int    `json:"sample_rate,omitempty"`
	EnableIntermediateResult       bool   `json:"enable_intermediate_result"`
	EnablePunctuationPrediction    bool   `json:"enable_punctuation_prediction"`
	EnableInverseTextNormalization bool   `json:"enable_inverse_text_normalization"`
	MaxSentenceSilence             int    `json:"max_sentence_silence,omitempty"`
	EnableWords                    bool   `json:"enable_words"`
}

// 阿里语音识别配置
func NewAsrConfig() *AsrConfig {
	return &AsrConfig{
		RegionId: "cn-shanghai",
		Domain:   "nls-meta.cn-shanghai.aliyuncs.com",
		//ApiUrl:                         "wss://nls-gateway-cn-beijing.aliyuncs.com/ws/v1",
		ApiUrl:                         "wss://nls-gateway.cn-shanghai.aliyuncs.com/ws/v1",
		AppKey:                         "EgeslkdqKlQL1l3Y",
		Endpoint:                       "rtc.aliyuncs.com",
		AccessKeyId:                    "LTAI5t9ZvWvcpiUnR744vSvX",
		AccessKeySecret:                "eBGOFluvIlVAhf8nDM4Se0pJEkzP5N",
		Format:                         "pcm",
		SampleRate:                     16000,
		EnablePunctuationPrediction:    true,
		EnableInverseTextNormalization: false,
		EnableIntermediateResult:       true,
		MaxSentenceSilence:             800,
		EnableWords:                    false,
	}
}
